package com.zipking.cloud.springbootmybatis.guava;

import com.google.common.eventbus.EventBus;

// 示例
public class EventBusDemo {
    public static void main(String[] args) {
        EventBus eventBus = new EventBus();
        EventListener listener = new EventListener();

        // 注册订阅者
        eventBus.register(listener);

        // 发布事件
        eventBus.post(new UserActionEvent("login"));
    }
}

